package cn.tedu.net.innerclass;
//本类用于测试成员内部类被private修饰的现象
public class TestInnter2 {
    public static void main(String[] args) {
//        Outer2.Inner2 oi2 = new Outer2().new Inner2();
//        oi2.study();
          new Outer2().inner();

    }
}

//创建外部类Outer2
class Outer2{
   private class Inner2{
        public void study(){
            System.out.println("Inner2...终于离开这个狗老师了");
        }
    }
    public void inner(){
       Inner2 inner2=new Inner2();
       inner2.study();
    }
}